﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Np.GalleryDownloader.Classes.Extensions
{
    public static class StringEx
    {
        public static int ToInt(this string input)
        {
            return ToInt(input, 0);
        }

        public static int ToInt(this string input, int defaultValue)
        {
            int i = defaultValue;
            Int32.TryParse(input, out i);
            return i;
        }
    }
}
